<?php

namespace App\Transformers\Admin;

use League\Fractal\TransformerAbstract;
use App\Models\Admin\AdminUser;

/**
 * Class AdminUserTransformer.
 *
 * @package namespace App\Transformers\Admin;
 */
class AdminUserTransformer extends TransformerAbstract
{
    /**
     * Transform the AdminUser entity.
     *
     * @param \App\Models\Admin\AdminUser $model
     *
     * @return array
     */
    public function transform(AdminUser $model)
    {
        return [
            'id'         => (int) $model->id,
            'name' => $model->name,
            'email' => $model->email,
            'is_super' => $model->is_super,
            /* place your other model properties here */

            'created_at' => (string)$model->created_at,
            'updated_at' => (string)$model->updated_at
        ];
    }
}
